package factories

import (
	"gitee.com/sweetsunnyflower/carpooling-server-go/app/models/transmission_type"

	"github.com/bxcodec/faker/v3"
)

func MakeTransmissionTypes(count int) []transmission_type.TransmissionType {

	transmissions := []string{
		"At变速箱",
		"CVT变速箱",
		"AMT变速箱",
		"双离合变速箱",
		"手动变速箱",
	}

	var objs []transmission_type.TransmissionType

	// 设置唯一性，如 TransmissionType 模型的某个字段需要唯一，即可取消注释
	faker.SetGenerateUniqueValues(true)

	for i := 0; i < len(transmissions); i++ {
		transmissionTypeModel := transmission_type.TransmissionType{
			Name: transmissions[i],
		}
		objs = append(objs, transmissionTypeModel)
	}

	return objs
}
